#ifndef	__RAY_H__
#define	__RAY_H__

#include "BasicType/BasicType.h"

namespace GCRE {
	namespace SceneModel {
		/************************************************************************
		*                                       Ray                                                              *
		*                        X = Origin + Direction * t;                                           *
		************************************************************************/
		class Ray {
			public:
				Ray( const Ray& r );
				Ray( const BasicType::SFVec3f& o, const BasicType::SFVec3f& d );

				Ray& operator=( const Ray& r );

				void SetDirection( const BasicType::SFVec3f& d );
				void SetOrigin( const BasicType::SFVec3f& o );
				BasicType::SFVec3f GetDirection() const;
				BasicType::SFVec3f GetOrigin() const;

			protected:
				Ray();

			private:
				BasicType::SFVec3f m_Origin;
				BasicType::SFVec3f m_Direction;
		};

		inline void Ray::SetDirection( const BasicType::SFVec3f& d ) { m_Direction = d; }
		inline BasicType::SFVec3f Ray::GetDirection() const { return m_Direction; }
		inline void Ray::SetOrigin( const BasicType::SFVec3f& o ) { m_Origin = o; }
		inline BasicType::SFVec3f Ray::GetOrigin() const { return m_Origin; }

	}
}

#endif	//	__RAY_H__